package edu.purdue.cs.aggr;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public abstract class AbstractAccumulator implements Externalizable
{
  private String sourceId;
  
  public AbstractAccumulator(String sourceId) {
    this.sourceId = sourceId;
  }
  
  @Override
  public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(sourceId);
  }

  @Override
  public void readExternal(ObjectInput in) throws IOException,
      ClassNotFoundException {
    sourceId = (String) in.readObject();
  }
  
  public String getSourceId()
  {
    return sourceId;
  }
  
  public void setSourceId(String sourceId) {
    this.sourceId = sourceId;
  }
}
